package com.water.controller;

import com.water.entity.RdYearmonth;
import com.water.service.RdYearmonthService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * (RdYearmonth)表控制层
 *
 * @author 小博
 * @since 2020-12-15 10:03:50
 */
@Controller
@RequestMapping("rdyearmont")
public class RdYearmonthController {
    /**
     * 服务对象
     */
    @Resource
    private RdYearmonthService rdYearmonthService;


    /**
     * 跳转到抄表初始化
     * @param model
     * @param rdYearmonth
     * @return
     */
    @RequestMapping("/rdyearmonth")
    public String rdyearmonth(Model model,RdYearmonth rdYearmonth){
        List<Map<String,Object>> list = rdYearmonthService.queryA(rdYearmonth);
        model.addAttribute("list",list);
        return "./rd/rd_init";
    }


    /**
     * 初始化抄表年月
     * @return
     */
    @RequestMapping("/rd_init_progress")
    public String rd_init_progress(){
        return "./rd/rd_init_progress";
    }
}